$OpenBSD: patch-awesomeConfig_cmake,v 1.22 2017/03/22 17:35:26 dcoppa Exp $
--- awesomeConfig.cmake.orig	Sat Mar 18 10:49:46 2017
+++ awesomeConfig.cmake	Wed Mar 22 18:25:36 2017
@@ -269,11 +269,7 @@ endif()
 # {{{ Install path and configuration variables
 #If a sysconfdir is specified, use it instead
 #of the default configuration dir.
-if(DEFINED SYSCONFDIR)
-    set(SYSCONFDIR ${SYSCONFDIR} CACHE PATH "config directory")
-else()
-    set(SYSCONFDIR ${CMAKE_INSTALL_PREFIX}/etc CACHE PATH "config directory")
-endif()
+set(SYSCONFDIR ${SYSCONFDIR} CACHE PATH "config directory")
 
 #If an XDG Config Dir is specificed, use it instead
 #of the default XDG configuration dir.
@@ -308,7 +304,7 @@ endif()
 if(DEFINED AWESOME_MAN_PATH)
    set(AWESOME_MAN_PATH ${AWESOME_MAN_PATH} CACHE PATH "awesome manpage directory")
 else()
-   set(AWESOME_MAN_PATH ${CMAKE_INSTALL_PREFIX}/share/man CACHE PATH "awesome manpage directory")
+   set(AWESOME_MAN_PATH ${CMAKE_INSTALL_PREFIX}/man CACHE PATH "awesome manpage directory")
 endif()
 
 # Hide to avoid confusion
@@ -394,15 +390,14 @@ file(MAKE_DIRECTORY ${BUILD_DIR}/script_files/)
 
 add_custom_command(
         OUTPUT ${BUILD_DIR}/docs/06-appearance.md
-        COMMAND lua ${SOURCE_DIR}/docs/06-appearance.md.lua
+        COMMAND ${MODLUA_BIN} ${SOURCE_DIR}/docs/06-appearance.md.lua
         ${BUILD_DIR}/docs/06-appearance.md
-        DEPENDS lgi-check
 )
 
 add_custom_command(
         OUTPUT ${BUILD_DIR}/awesomerc.lua ${BUILD_DIR}/docs/05-awesomerc.md
             ${BUILD_DIR}/script_files/rc.lua
-        COMMAND lua ${SOURCE_DIR}/docs/05-awesomerc.md.lua
+        COMMAND ${MODLUA_BIN} ${SOURCE_DIR}/docs/05-awesomerc.md.lua
         ${BUILD_DIR}/docs/05-awesomerc.md ${SOURCE_DIR}/awesomerc.lua
         ${BUILD_DIR}/awesomerc.lua
         ${BUILD_DIR}/script_files/rc.lua
@@ -410,7 +405,7 @@ add_custom_command(
 
 add_custom_command(
         OUTPUT ${BUILD_DIR}/script_files/theme.lua
-        COMMAND lua ${SOURCE_DIR}/docs/sample_theme.lua ${BUILD_DIR}/script_files/
+        COMMAND ${MODLUA_BIN} ${SOURCE_DIR}/docs/sample_theme.lua ${BUILD_DIR}/script_files/
 )
 
 # Create a target for the auto-generated awesomerc.lua and other files
